package cn.lichenfei.project;

import cn.lichenfei.fxui.common.FxUtil;
import cn.lichenfei.fxui.controls.CFHeader;
import cn.lichenfei.fxui.controls.CFStage;
import cn.lichenfei.project.ui.Index;
import javafx.application.Application;
import javafx.application.HostServices;
import javafx.stage.Stage;

public class FxApplication extends Application {

    public static HostServices hostServices;

    /*
     *
     * jdk-17.0.6 可以直接在这里运行
     *
     */
    @Override
    public void start(Stage primaryStage) {
        hostServices = getHostServices();

        //基础尺寸
        CFStage stage = new CFStage(new Index(), 800, 500)
                .setHeaderStyle(CFHeader.HeaderStyle.CLOSE)
                .setBackdropImage(FxUtil.getImage("/img/backdrop.png"));
        stage.show();
    }

}